<script setup>
import { useRoute, useRouter } from 'vue-router'
import { ref } from 'vue';

let username = ref('')
let password = ref('')
const route = useRoute()
const router = useRouter()

username.value = route.query.username
password.value = route.query.password

let fun1 = () => {
    window.localStorage.removeItem('username')
    router.push('/login')
}
</script>

<template>
  <div>
    <h4>欢迎{{ username }}，密码为；{{ password }}</h4>
    <input type="button" @click="fun1()" value="退出登录">
  </div>
</template>

<style scoped>
</style>